home *** CD-ROM | disk | FTP | other *** search
- ***************************************************************************
- ****
- **** DESK ACCESSORY and DEVICE DRIVER Entry Code/Data
- ****
- ***************************************************************************
- ; * Copyright (c) 1990 Regents of The University of Michigan.
- ; * All Rights Reserved.
- ; *
- ; * Permission to use, copy, modify, and distribute this software
- ; * and its documentation for any purpose and without fee is hereby
- ; * granted, provided that the above copyright notice appears in all
- ; * copies and that both that copyright notice and this permission
- ; * notice appear in supporting documentation, and that the name of
- ; * The University of Michigan not be used in advertising or
- ; * publicity pertaining to distribution of the software without
- ; * specific, written prior permission. This software is supplied as
- ; * is without expressed or implied warranties of any kind.
- ; *
- ; * ITD Research Systems
- ; * University of Michigan
- ; * 535 W. William Street
- ; * Ann Arbor, Michigan
- ; * +1-313-936-2652
- ; * netatalk@terminator.cc.umich.edu
- ; *
-
-
- STRING PASCAL
-
- INCLUDE 'ToolEqu.a'
- INCLUDE 'SysEqu.a'
-
- CASE OBJ
- **************************** DESK ACCESSORY ENTRY **************************
- IMPORT %DRVRMain
-
- DAEntry Proc Export ; See Device Manager IM:2
- ;
- ; First we need to set the drvrFlags (IM II-188), choose from
- ;
- ; dReadEnable enable driver for read operations (drivers only)
- ; dWritEnable enable driver for writing (drivers only)
- ; dCtlEnable enable driver/da for control operations
- ; dStatEnable enable driver/da for status operations (drivers only)
- ; dNeedGoodBye driver/da needs a "goodbye kiss"
- ; dNeedTime driver/da needs "main thread" time
- ; dNeedLock driver will be accessed at interrupt level (drivers only)
- ;
- DC.B (1<<dCtlEnable) ; control flags set
- DC.B 0 ; Lower byte is unused
- ;
- ; Next is the the drvrDelay (IM II-188), set only if dNeedTime flag set above
- ;
- DC.W 5*60 ; 5 sec periodic update
- ;
- ; Next is the the drvrEMask (IM I-444), which events DA can respond to...
- ; Must be NIL for drivers, for DA's choose from
- ; mButDwnEvt mouse button down is event 1
- ; keyDwnEvt key down is event 3
- ; keyUpEvt key up is event 4
- ; autoKeyEvt auto-repeated key is event 5
- ; updatEvt update event
- ; activateEvt activate/deactive event
- ;
- DC.W ( 1<<activateEvt | 1<<updatEvt | 1<<keyDwnEvt | 1<<autoKeyEvt )
- ;
- ; Next is the the drvrMenu (IM I-444), Menu ID of DA's menu, or NIL
- ;
- DC.W 0 ; No associated menu
- ;
- ; Next are the offsets to the main routines of the driver/DA
- ;
- DC.W %DRVRMain - DAEntry ; Open routine
- DC.W %DRVRMain - DAEntry +4 ; Prime - unused for DA's
- DC.W %DRVRMain - DAEntry +8 ; Control
- DC.W %DRVRMain - DAEntry +12 ; Status - unused for DA's
- DC.W %DRVRMain - DAEntry +16 ; Close
-
- DAName
- DC.B 'AFS Log' ; DA/DRVR Name
- ORG DAName+32 ; Pad string out to 32 bytes
-
- END
-